<!doctype html>
<html lang="zh-cn" xml:lang="zh-cn">
<head>
    {$site_config.qq_admins}
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>{$seo.title}</title>
    <meta charset="utf-8">
    <meta name="keywords" content="{$seo.keywords}" />
    <meta name="description" content="{$seo.description}" />
    <meta name="viewport" content="width=device-width,initial-scale=1{if $viewport eq 'pc'},user-scalable=yes,maximum-scale=3{else},maximum-scale=2,user-scalable=no{/if}">
    <link rel="stylesheet" href="/style/mobile/css/common.css">
    <link rel="stylesheet" href="/style/mobile/css/font/iconfont.css">
    <script src="/style/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/style/layer/layer.min.js"></script>
    <script type="text/javascript" src="/style/common.js"></script>
    {if $wechat && $smarty.session.mid}
    {if !$wx_config_false}
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">
        $(function(){
            //微信端所有页面带邀请者ID
            wx.config({
                debug: false,
                appId: '{$signPackage.appId}',
                timestamp: '{$signPackage.timestamp}',
                nonceStr: '{$signPackage.nonceStr}',
                signature: '{$signPackage.signature}',
                jsApiList: [
                    //所有要调用的 API 都要加到这个列表中
                    'checkJsApi',
                    'onMenuShareTimeline',
                    'onMenuShareAppMessage',
                    'onMenuShareQQ'
                ]
            });

            {if $nav neq myivt}
            var oSearch = this.location.search.toString();
            oSearch = oSearch.replace(eval('/(code=)([^&]*)&/gi'),'');
            oSearch = oSearch.replace(eval('/(code=)([^&]*)/gi'),'');
            oSearch = oSearch.replace(eval('/(state=)([^&]*)&/gi'),'');
            oSearch = oSearch.replace(eval('/(state=)([^&]*)/gi'),'');
            if(oSearch.trim() == '?'){ oSearch = ''; }

            if(oSearch.indexOf('?')>=0){ oSearch += '&'; }
            else{ oSearch += '?'; }
            oSearch += 'iv={$smarty.session.mid}';

            var href = location.origin+location.pathname+oSearch+location.hash;
            var title = $("title").eq(0).html();
            var desc = $("meta[name='description']").eq(0).attr('content');
            var pic = $('img').eq(0).attr('src');

            wx.ready(function () {
                //分享给朋友
                wx.onMenuShareAppMessage({
                    title: title,
                    desc: desc,
                    link: href,
                    imgUrl: pic,
                    success: function (res) {
                        layer.msg('分享成功',3,{ type:1 })
                    },
                    cancel: function (res) {
                        layer.msg('已取消');
                    }
                });
                //分享到朋友圈
                wx.onMenuShareTimeline({
                    title: title,
                    link: href,
                    imgUrl: pic,
                    success: function (res) {
                        layer.msg('分享成功',3,{ type:1 })
                    },
                    cancel: function (res) {
                        layer.msg('已取消');
                    }
                });
                //分享到QQ
                wx.onMenuShareQQ({
                    title: title,
                    desc: desc,
                    link: href,
                    imgUrl: pic,
                    success: function () {
                        layer.msg('分享成功',3,{ type:1 })
                    },
                    cancel: function () {
                        layer.msg('已取消');
                    }
                });
            })
            {/if}
        })
    </script>
    {/if}
    {/if}
</head>
<body>

{if $header eq 'header2'}
<header id="header2">
    <h1>{if $row.head}{$row.head}{else}{$seo.head}{/if}</h1>
    <div class="back"><a class="ap-icon" href="javascript:history.back();"></a></div>
    <div class="menu">
        <!--<a class="icon-cart ap-icon" href="{url('/yunbuy/cart')}"><em class="cartNum">{$cartNum}</em></a>-->
        <a class="icon-home ap-icon" href="{url()}"></a>
    </div>
</header>
{else}

{/if}